<template lang="html">
    <div class="el_box">
        <el-form v-model="formData" label-width="140px">

          <el-form-item label="延迟罚款金额">
            <el-input v-model="formData.find"></el-input>
          </el-form-item>
          <el-form-item label="售卡分佣比例">
            <el-input v-model="formData.card_per"></el-input>
          </el-form-item>
          <!-- <el-form-item label="推荐维修厂奖励金额">
            <el-input v-model="formData.rec_shop"></el-input>
          </el-form-item>
          <el-form-item label="推荐运营商奖励金额">
            <el-input v-model="formData.rec_agent"></el-input>
          </el-form-item>
          <el-form-item label="推荐市代奖励金额">
            <el-input v-model="formData.rec_supply"></el-input>
          </el-form-item> -->

          <el-form-item>
            <el-button type="primary" @click="submitForm">提交</el-button>
          </el-form-item>
        </el-form>
    </div>
</template>

<script>
export default {
  data () {
    return {
      formData: {}
    }
  },
  created () {
    this.getFormData()
  },
  methods: {
    getFormData () {
      this.$http3.getInfo().then(res => {
        this.formData =
          res.data.code == 1 ?
            res.data.data : {}
      })
    },
    submitForm () {
      this.$http3.alterInfo({
        find: this.formData.find,
        card_per: this.formData.card_per,
        // rec_shop: this.formData.rec_shop,
        // rec_agent: this.formData.rec_agent,
        // rec_supply: this.formData.rec_supply
      }).then(res => {
        res.data.code == 1 ?
          this.$message.success(res.data.msg) :
          this.$message.error(res.data.msg);
      })

    }

  }
}
</script>

<style lang="css" scoped>
.el_box {
  width: 600px;
  padding: 10px 10px 10px 30px;
  box-sizing: border-box;
}
</style>
